import BaseEnum from '@/core/utils/BaseEnum'
import BaseEnumValue from '@/core/utils/BaseEnumValue'

class Oauth2RegisteredClientAuthorizationGrantTypesEnum extends BaseEnum<string> {
	AUTHORIZATION_CODE = new BaseEnumValue<string>('authorization_code', '授权码认证')
	REFRESH_TOKEN = new BaseEnumValue<string>('refresh_token', '刷新token')
	CLIENT_CREDENTIALS = new BaseEnumValue<string>('client_credentials', '客户端认证')
	PASSWORD = new BaseEnumValue<string>('password', '密码认证')
	REST = new BaseEnumValue<string>('rest', 'rest访问认证')
	EXTERNAL_USER = new BaseEnumValue<string>('external_user', '外部主动认证')
	constructor() {
		super(['AUTHORIZATION_CODE', 'REFRESH_TOKEN', 'CLIENT_CREDENTIALS', 'PASSWORD', 'REST', 'EXTERNAL_USER'])
	}
}

const enumModel = new Oauth2RegisteredClientAuthorizationGrantTypesEnum()

export default enumModel
